import 'package:flutter/material.dart';

@immutable
class CustomColors extends ThemeExtension<CustomColors> {
  final Color iconColor;
  final Color blue;
  final Color secondbg;
  final Color borderColor;
  final Color bottomPlayerBg;

  const CustomColors({
    required this.iconColor,
    required this.blue,
    required this.secondbg,
    required this.borderColor,
    required this.bottomPlayerBg,
  });

  @override
  CustomColors copyWith({
    Color? iconColor,
    Color? blue,
    Color? secondbg,
    Color? borderColor,
    Color? bottomPlayerBg,
  }) {
    return CustomColors(
      iconColor: iconColor ?? this.iconColor,
      blue: blue ?? this.blue,
      secondbg: secondbg ?? this.secondbg,
      borderColor: borderColor ?? this.borderColor,
      bottomPlayerBg: bottomPlayerBg ?? this.bottomPlayerBg,
    );
  }

  @override
  CustomColors lerp(ThemeExtension<CustomColors>? other, double t) {
    if (other is! CustomColors) return this;
    return CustomColors(
      iconColor: Color.lerp(iconColor, other.iconColor, t)!,
      blue: Color.lerp(blue, other.blue, t)!,
      secondbg: Color.lerp(secondbg, other.secondbg, t)!,
      borderColor: Color.lerp(borderColor, other.borderColor, t)!,
      bottomPlayerBg: Color.lerp(borderColor, other.borderColor, t)!,
    );
  }
}
